<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<h3 style="padding-left: 20px;padding-top: 10px">
<a class="add fb" href=""><em><?php echo $info['name']?>——履历类型</em></a>
<a href="javascript:history.back(-1);" style="font-size:14px;color: #0000FF"><em>返回上一级</em></a>
</h3>
<div class="pad-10">
<form name="myform" action="?m=experience_type&c=manage&a=edit&id=<?php echo $info['id']?>" method="post" id="myform" enctype="multipart/form-data">
<div class="content pad-10" id="show_div_1" style="height:auto">
		<table width="100%" class="table_form">
					<input type="hidden" name="data[id]" id="type_id"  class="input-text" value="<?php echo $info['id']?>" />
			<tr>
				<td width="120"><?php echo L('experience_type_name')?>：</td>
				<td>
					<input type="text" name="data[name]" id="name"  class="input-text" value="<?php echo $info['name']?>" />
				</td>
			</tr>
			
			<tr>
				<td width="120"><?php echo L('experience_type_en_name')?>：</td>
				<td>
					<input type="text" name="data[en_name]" id="en_name"  class="input-text" value="<?php echo $info['en_name']?>" />
				</td>
			</tr>
			
			<tr>
				<td width="120"><?php echo L('experience_type')?>：</td>
				<td>
					<select name="data[experience_type_id]">
						<option value="0"><?php echo L('please_select_parent_category')?></option>
						<?php 
							foreach ($experience_type as $v){
						?>
						<option value="<?php echo $v['id']?>" <?php if($info['parent_id'] == $v['id']){echo 'selected';}?>><?php echo $v['name']?></option>
							<?php foreach ($v['child'] as $vs) {?>
							<option value="<?php echo $vs['id']?>" <?php if($info['parent_id'] == $vs['id']){echo 'selected';}?>>┣<?php echo $vs['name']?></option>
							<?php 
								}
							?>
						<?php 
							}
						?>
					</select>
				</td>
				
			</tr>
			
		</table>


</div>
    <div class="bk15"></div>
    <input name="dosubmit" type="submit" id="dosubmit" value="<?php echo L('submit')?>" class="button">


</form>
</div>
<script type="text/javascript">
<!--
function IsLetters(str){
	if(!(/^[A-Za-z]+$/.test(str)))return "请输入正确的英文名称";
	return true;
}
//-->
</script>
<script type="text/javascript">
$(document).ready(function() {
	var id = $("input[name='data[id]']").val();
	var keyword = $("input[name='data[name]']").val();
	$.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'200',height:'50'})}});
	$("#name").formValidator(
			{onshow:"<?php echo L('input').L('experience_type_name')?>",
			 onfocus:"<?php echo L('input').L('experience_type_name')?>"}
	).inputValidator(
			{min:1,onerror:"<?php echo L('input').L('experience_type_name')?>"}
	);
	$("#en_name").formValidator(
			{onshow:"<?php echo L('input').L('experience_type_en_name')?>",
			 onfocus:"<?php echo L('input').L('experience_type_en_name')?>"}
	).inputValidator(
			{min:1,onerror:"<?php echo L('input').L('experience_type_en_name')?>"}
	).functionValidator({fun:IsLetters});
	

});
</script>
</body>
</html>